<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateManagerTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateManagerLabel_managerId}" for="managerId" />
                    <h:inputText id="managerId" value="#{managerController.selected.managerId}" title="#{bundle.CreateManagerTitle_managerId}" required="true" requiredMessage="#{bundle.CreateManagerRequiredMessage_managerId}"/>
                    <h:outputLabel value="#{bundle.CreateManagerLabel_username}" for="username" />
                    <h:inputText id="username" value="#{managerController.selected.username}" title="#{bundle.CreateManagerTitle_username}" required="true" requiredMessage="#{bundle.CreateManagerRequiredMessage_username}"/>
                    <h:outputLabel value="#{bundle.CreateManagerLabel_password}" for="password" />
                    <h:inputText id="password" value="#{managerController.selected.password}" title="#{bundle.CreateManagerTitle_password}" required="true" requiredMessage="#{bundle.CreateManagerRequiredMessage_password}"/>
                    <h:outputLabel value="#{bundle.CreateManagerLabel_name}" for="name" />
                    <h:inputText id="name" value="#{managerController.selected.name}" title="#{bundle.CreateManagerTitle_name}" required="true" requiredMessage="#{bundle.CreateManagerRequiredMessage_name}"/>
                    <h:outputLabel value="#{bundle.CreateManagerLabel_gender}" for="gender" />
                    <h:inputText id="gender" value="#{managerController.selected.gender}" title="#{bundle.CreateManagerTitle_gender}" />
                    <h:outputLabel value="#{bundle.CreateManagerLabel_birthday}" for="birthday" />
                    <h:inputText id="birthday" value="#{managerController.selected.birthday}" title="#{bundle.CreateManagerTitle_birthday}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateManagerLabel_address}" for="address" />
                    <h:inputText id="address" value="#{managerController.selected.address}" title="#{bundle.CreateManagerTitle_address}" />
                    <h:outputLabel value="#{bundle.CreateManagerLabel_phone}" for="phone" />
                    <h:inputText id="phone" value="#{managerController.selected.phone}" title="#{bundle.CreateManagerTitle_phone}" />
                    <h:outputLabel value="#{bundle.CreateManagerLabel_email}" for="email" />
                    <h:inputText id="email" value="#{managerController.selected.email}" title="#{bundle.CreateManagerTitle_email}" required="true" requiredMessage="#{bundle.CreateManagerRequiredMessage_email}"/>
                    <h:outputLabel value="#{bundle.CreateManagerLabel_isAdministrator}" for="isAdministrator" />
                    <h:inputText id="isAdministrator" value="#{managerController.selected.isAdministrator}" title="#{bundle.CreateManagerTitle_isAdministrator}" required="true" requiredMessage="#{bundle.CreateManagerRequiredMessage_isAdministrator}"/>
                    <h:outputLabel value="#{bundle.CreateManagerLabel_isActive}" for="isActive" />
                    <h:inputText id="isActive" value="#{managerController.selected.isActive}" title="#{bundle.CreateManagerTitle_isActive}" required="true" requiredMessage="#{bundle.CreateManagerRequiredMessage_isActive}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{managerController.create}" value="#{bundle.CreateManagerSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{managerController.prepareList}" value="#{bundle.CreateManagerShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateManagerIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
